package com.bwie.mq;

import com.bwie.pojo.po.User;
import org.springframework.amqp.core.AmqpTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class MessageProducer {

    @Autowired
    private AmqpTemplate amqpTemplate;
    //月卡即将过期
    public void sengMsgToMq(User user){

        amqpTemplate.convertAndSend("2212akey",user);
    }


}
